class Usuario < ActiveRecord::Base
  has_many :anuncio_alugueis
  
  #validates :email, :presence => { :message => "Story title is required" }
  #validates_presence_of :email, :on => :create, :message => 'You must provide a value for this field.' 
  validates_presence_of :email, :message => 'You must provide a value for this field.' 
  
  validates :password, :presence => true
 
  
  # Include default devise modules. Others available are:
  # :token_authenticatable, :lockable, :confirmable, :timeoutable and :activatable
  devise :database_authenticatable, :registerable, 
         :recoverable, :rememberable, :trackable, :validatable

  # Setup accessible (or protected) attributes for your model
  attr_accessible :email, :password, :password_confirmation, :primeiro_nome, :sobrenome, :data_de_nascimento, :sexo, :tipo_usuario
end
